#import <Foundation/Foundation.h>


//M001: Return NO, if both inputs are same, YES otherwise
BOOL areIntsDifferent( int thing1, int thing2)
{
    if ( thing1 == thing2 ) { return (NO);
    }
    else { return (YES); }

}


//M002: Return the human-readable string "YES" or "NO" for BOOL output
NSString *boolString( BOOL yesNo )
{
    if ( yesNo == NO ) { return (@"NO");
    }
    else { return (@"YES"); }
}


int main (int argc, const char * argv[]) 
{
    BOOL areTheyDifferent = NO; //local variable
    
    areTheyDifferent = areIntsDifferent( 5, 5 );
    //The %@ symbol means string pointer, 
    //C-Style cannot convert string pointer to string, so the symbol tells Obj-C to do the work
    NSLog( @"are %d and %d different? %@", 5, 5, boolString(areTheyDifferent) );
    
    areTheyDifferent = areIntsDifferent( 23, 42);
    NSLog( @"are %d and %d different? %@", 23, 42, boolString(areTheyDifferent) );

    return 0;
}
